import Vue from "vue";
import Router from "vue-router";

import home from "@/components/zh/home/home";
import zh from "@/components/zh/zh";
import en from "@/components/en/en";
import jap from "@/components/jap/jap";

const _import = require("./_import_" + process.env.NODE_ENV);
Vue.use(Router);

export default new Router({
  linkActiveClass: "router-link-active",
  scrollBehavior(to, from, savedPosition) {
    if (savedPosition) {
      return savedPosition;
    } else {
      return { x: 0, y: 0 };
    }
  },
  mode: process.env.VUE_ROUTE_MODE,
  routes: [
    {
      name: "zh_home",
      path: "/",
      component: _import("zh/home/home")
    },
    //关于我们 有关协力
    {
      name: "zh_aboutUs",
      path: "/zh_aboutUs",
      component: _import("zh/aboutUs/aboutUs"),
      redirect: { name: "zh_overview" },
      children: [
        {
          name: "zh_overview",
          path: "overview",
          component: _import("zh/aboutUs/overview")
        },
        {
          name: "zh_honor",
          path: "honor",
          component: _import("zh/aboutUs/honor")
        },
        {
          name: "zh_honor_details",
          path: "honor_details",
          component: _import("zh/aboutUs/honer_details"),
          meta: {
            parameter: true
          }
        },

        {
          name: "zh_duty",
          path: "duty",
          component: _import("zh/aboutUs/duty")
        },
        {
          name: "zh_lectureHall",
          path: "lectureHall",
          component: _import("zh/aboutUs/lectureHall")
        },
        {
          name: "zh_lectureHall_details",
          path: "lectureHall_details",
          component: _import("zh/aboutUs/lectureHallDetails"),
          meta: {
            parameter: true
          }
        }
      ]
    },
    //新闻资讯
    {
      name: "zh_news",
      path: "/zh_news",
      component: _import("zh/news/news"),
      redirect: { name: "zh_professional" },
      children: [
        {
          name: "zh_professional",
          path: "professional",
          component: _import("zh/news/professional")
        },
        {
          name: "zh_professional_details",
          path: "professionalDetalis",
          component: _import("zh/news/professionalDetails"),
          meta: {
            parameter: true
          }
        },
        {
          name: "zh_companyNews",
          path: "companyNews",
          component: _import("zh/news/companyNews")
        },
        {
          name: "zh_problem",
          path: "problem",
          component: _import("zh/news/problem")
        }
      ]
    },
    //专业领域
    {
      name: "zh_field",
      path: "/zh_field",
      component: _import("zh/field/field"),
      children: [
        // {
        //   name: 'zh_financial',
        //   path: 'financial',
        //   component: _import('zh/field/financial')
        // },
        // {
        //   name: 'zh_Maritime',
        //   path: 'Maritime',
        //   component: _import('zh/field/Maritime')
        // },
        // {
        //   name: 'zh_internationalTrade',
        //   path: 'internationalTrade',
        //   component: _import('zh/field/internationalTrade')
        // },
        // {
        //   name: 'zh_securities',
        //   path: 'securities',
        //   component: _import('zh/field/securities')
        // },
        // {
        //   name: 'zh_restructuring',
        //   path: 'restructuring',
        //   component: _import('zh/field/restructuring')
        // },
      ]
    },
    //专业领域详情页
    {
      name: "zh_fieldDetails",
      path: "/zh_fieldDetails",
      component: _import("zh/field/fieldDetails")
    },
    //党群建设
    {
      name: "zh_party_mass",
      path: "/zh_party_mass",
      component: _import("zh/party_mass/party_mass"),
      redirect: { name: "zh_party_mass_list" },
      children: [
        {
          name: "zh_party_mass_list",
          path: "party_mass_list",
          component: _import("zh/party_mass/party_mass_list")
        },
        {
          name: "zh_party_mass_details",
          path: "party_massDetails",
          component: _import("zh/party_mass/party_massDetails"),
          meta: {
            parameter: true
          }
        }
      ]
    },
    //专业人员  personnel
    {
      name: "zh_personnel",
      path: "/zh_personnel",
      component: _import("zh/personnel/personnel"),
      redirect: { name: "zh_personnel_list" },
      children: [
        {
          name: "zh_personnel_list",
          path: "personnel_list",
          component: _import("zh/personnel/personnel_list")
        },
        {
          name: "zh_personnel_details",
          path: "personnelDetails",
          component: _import("zh/personnel/personnel_etails"),
          meta: {
            parameter: true
          }
        }
      ]
    },
    // 人才招聘
    {
      name: "zh_recruitment",
      path: "/zh_recruitment",
      component: _import("zh/recruitment/recruitment"),
      redirect: { name: "zh_social" },
      children: [
        {
          name: "zh_social",
          path: "social",
          component: _import("zh/recruitment/social")
        },
        {
          name: "zh_campus",
          path: "campus",
          component: _import("zh/recruitment/campus")
        },
        {
          name: "zh_life",
          path: "life",
          component: _import("zh/recruitment/life")
        }
      ]
    },
    // 活动专栏
    {
      name: "zh_activity",
      path: "/zh_activity",
      component: _import("zh/activity/activity"),
      redirect: { name: "zh_activity_legalAid" },
      children: [
        {
          name: "zh_activity_legalAid",
          path: "legalAid",
          component: _import("zh/activity/legalAid")
        },
        {
          name: "zh_activity_legalAidDetalis",
          path: "legalAidDetails",
          component: _import("zh/activity/legalAidDetails")
        }
      ]
    },
    // 联系我们
    {
      name: "zh_contactUs",
      path: "/zh_contactUs",
      component: _import("zh/contactUs/contactUs"),
      redirect: { name: "zh_contactUs_list" },
      children: [
        {
          name: "zh_contactUs_list",
          path: "zh_contactUs_list",
          component: _import("zh/contactUs/contactUs_list")
        },
        {
          name: "zh_contactUs_detail",
          path: "zh_contactUs_detail",
          component: _import("zh/contactUs/contactUsDetails"),
          meta: {
            parameter: true
          }
        },
        {
          name: "zh_contactUs_news_detail",
          path: "zh_contactUs__news_detail",
          component: _import("zh/contactUs/contactUsNews")
        }
      ]
    },
    // 法律声明
    {
      name: "zh_legalNotices",
      path: "/zh_legalNotices",
      component: _import("zh/legalNotices/legalNotices")
    },
    // 隐私条款
    {
      name: "zh_privacyPolicy",
      path: "/zh_privacyPolicy",
      component: _import("zh/privacyPolicy/PrivacyPolicy")
    },

    // 站内搜索
    {
      name: "zh_search",
      path: "/zh_search",
      component: _import("zh/search/search")
    },
    {
      path: "/en",
      component: en,
      redirect: { name: "en_home" },
      children: [
        {
          name: "en_home",
          path: "en_home",
          component: _import("en/home/home")
        },
        //关于我们 有关协力
        {
          name: "en_aboutUs",
          path: "en_aboutUs",
          component: _import("en/aboutUs/aboutUs"),
          redirect: { name: "en_overview" },
          children: [
            {
              name: "en_overview",
              path: "overview",
              component: _import("en/aboutUs/overview")
            },
            {
              name: "en_honor",
              path: "honor",
              component: _import("en/aboutUs/honor")
            },
            {
              name: "en_honor_details",
              path: "honor_details",
              component: _import("en/aboutUs/honer_details"),
              meta: {
                parameter: true
              }
            },

            {
              name: "en_duty",
              path: "duty",
              component: _import("en/aboutUs/duty")
            },
            // {
            //   name: 'en_lectureHall',
            //   path: 'lectureHall',
            //   component: _import('en/aboutUs/lectureHall')
            // },
            {
              name: "en_lectureHall_details",
              path: "lectureHall_details",
              component: _import("en/aboutUs/lectureHallDetails"),
              meta: {
                parameter: true
              }
            }
          ]
        },
        //新闻资讯
        {
          name: "en_news",
          path: "en_news",
          component: _import("en/news/news"),
          redirect: { name: "en_professional" },
          children: [
            {
              name: "en_professional",
              path: "professional",
              component: _import("en/news/professional")
            },
            {
              name: "en_professional_details",
              path: "professionalDetalis",
              component: _import("en/news/professionalDetails"),
              meta: {
                parameter: true
              }
            }
            // {
            //   name: 'en_companyNews',
            //   path: 'companyNews',
            //   component: _import('en/news/companyNews')
            // },
            // {
            //   name: 'en_problem',
            //   path: 'problem',
            //   component: _import('en/news/problem')
            // },
          ]
        },
        //专业领域
        {
          name: "en_field",
          path: "en_field",
          component: _import("en/field/field"),
          children: [
            // {
            //   name: 'en_financial',
            //   path: 'financial',
            //   component: _import('en/field/financial')
            // },
            // {
            //   name: 'en_Maritime',
            //   path: 'Maritime',
            //   component: _import('en/field/Maritime')
            // },
            // {
            //   name: 'en_internationalTrade',
            //   path: 'internationalTrade',
            //   component: _import('en/field/internationalTrade')
            // },
            // {
            //   name: 'en_securities',
            //   path: 'securities',
            //   component: _import('en/field/securities')
            // },
            // {
            //   name: 'en_restructuring',
            //   path: 'restructuring',
            //   component: _import('en/field/restructuring')
            // },
          ]
        },
        //专业领域详情页
        {
          name: "en_fieldDetails",
          path: "en_fieldDetails",
          component: _import("en/field/fieldDetails")
        },
        //党群建设
        // {
        //   name: 'en_party_mass',
        //   path: 'en_party_mass',
        //   component: _import('en/party_mass/party_mass'),
        //   redirect: { name: 'en_party_mass_list' },
        //   children: [
        //     {
        //       name: 'en_party_mass_list',
        //       path: 'party_mass_list',
        //       component: _import('en/party_mass/party_mass_list')
        //     },
        //     {
        //       name: 'en_party_mass_details',
        //       path: 'party_massDetails',
        //       component: _import('en/party_mass/party_massDetails'),
        //       meta:{
        //         parameter:true
        //       }
        //     }
        //   ]
        // },
        //专业人员  personnel
        {
          name: "en_personnel",
          path: "en_personnel",
          component: _import("en/personnel/personnel"),
          redirect: { name: "en_personnel_list" },
          children: [
            {
              name: "en_personnel_list",
              path: "personnel_list",
              component: _import("en/personnel/personnel_list")
            },
            {
              name: "en_personnel_details",
              path: "personnelDetails",
              component: _import("en/personnel/personnel_etails"),
              meta: {
                parameter: true
              }
            }
          ]
        },
        // 人才招聘
        // {
        //   name: 'en_recruitment',
        //   path: 'en_recruitment',
        //   component: _import('en/recruitment/recruitment'),
        //   redirect: { name: 'en_social' },
        //   children: [
        //     {
        //       name: 'en_social',
        //       path: 'social',
        //       component: _import('en/recruitment/social')
        //     },
        //     {
        //       name: 'en_campus',
        //       path: 'campus',
        //       component: _import('en/recruitment/campus')
        //     },
        //     {
        //       name: 'en_life',
        //       path: 'life',
        //       component: _import('en/recruitment/life')
        //     },
        //   ]
        // },
        // 活动专栏
        {
          name: "en_activity",
          path: "en_activity",
          component: _import("en/activity/activity"),
          redirect: { name: "en_activity_legalAid" },
          children: [
            {
              name: "en_activity_legalAid",
              path: "legalAid",
              component: _import("en/activity/legalAid")
            },
            {
              name: "en_activity_legalAidDetalis",
              path: "legalAidDetails",
              component: _import("en/activity/legalAidDetails")
            }
          ]
        },
        // 联系我们
        {
          name: "en_contactUs",
          path: "en_contactUs",
          component: _import("en/contactUs/contactUs"),
          redirect: { name: "en_contactUs_list" },
          children: [
            {
              name: "en_contactUs_list",
              path: "en_contactUs_list",
              component: _import("en/contactUs/contactUs_list")
            },
            {
              name: "en_contactUs_detail",
              path: "en_contactUs_detail",
              component: _import("en/contactUs/contactUsDetails"),
              meta: {
                parameter: true
              }
            },
            {
              name: "en_contactUs_news_detail",
              path: "en_contactUs__news_detail",
              component: _import("en/contactUs/contactUsNews")
            }
          ]
        },
        {
          name: "en_legalNotices",
          path: "en_legalNotices",
          component: _import("en/legalNotices/legalNotices")
        },
        // 隐私条款
        {
          name: "en_privacyPolicy",
          path: "/en_privacyPolicy",
          component: _import("en/privacyPolicy/PrivacyPolicy")
        }
      ]
    },
    // 站内搜索
    {
      name: "en_search",
      path: "/en_search",
      component: _import("en/search/search")
    },
    {
      path: "/jap",
      component: jap,
      redirect: { name: "jap_home" },
      children: [
        {
          name: "jap_home",
          path: "jap_home",
          component: _import("jap/home/home")
        },
        //关于我们 有关协力
        {
          name: "jap_aboutUs",
          path: "jap_aboutUs",
          component: _import("jap/aboutUs/aboutUs"),
          redirect: { name: "jap_overview" },
          children: [
            {
              name: "jap_overview",
              path: "overview",
              component: _import("jap/aboutUs/overview")
            },
            {
              name: "jap_honor",
              path: "honor",
              component: _import("jap/aboutUs/honor")
            },
            {
              name: "jap_honor_details",
              path: "honor_details",
              component: _import("jap/aboutUs/honer_details"),
              meta: {
                parameter: true
              }
            },

            {
              name: "jap_duty",
              path: "duty",
              component: _import("jap/aboutUs/duty")
            },
            // {
            //   name: 'jap_lectureHall',
            //   path: 'lectureHall',
            //   component: _import('jap/aboutUs/lectureHall')
            // },
            {
              name: "jap_lectureHall_details",
              path: "lectureHall_details",
              component: _import("jap/aboutUs/lectureHallDetails"),
              meta: {
                parameter: true
              }
            }
          ]
        },
        //新闻资讯
        {
          name: "jap_news",
          path: "jap_news",
          component: _import("jap/news/news"),
          redirect: { name: "jap_companyNews" },
          children: [
            // 专业文章
            {
              name: "jap_professional",
              path: "professional",
              component: _import("jap/news/professional")
            },
            {
              name: "jap_professional_details",
              path: "professionalDetalis",
              component: _import("jap/news/professionalDetails"),
              meta: {
                parameter: true
              }
            }
            // {
            //   name: 'jap_companyNews',
            //   path: 'companyNews',
            //   component: _import('jap/news/companyNews')
            // },
            // 问题解答
            // {
            //   name: 'jap_problem',
            //   path: 'problem',
            //   component: _import('jap/news/problem')
            // },
          ]
        },
        //专业领域
        {
          name: "jap_field",
          path: "jap_field",
          component: _import("jap/field/field")
        },
        //专业领域详情页
        {
          name: "jap_fieldDetails",
          path: "jap_fieldDetails",
          component: _import("jap/field/fieldDetails")
        },
        //党群建设
        // {
        //   name: 'jap_party_mass',
        //   path: 'jap_party_mass',
        //   component: _import('jap/party_mass/party_mass'),
        //   redirect: { name: 'jap_party_mass_list' },
        //   children: [
        //     {
        //       name: 'jap_party_mass_list',
        //       path: 'party_mass_list',
        //       component: _import('jap/party_mass/party_mass_list')
        //     },
        //     {
        //       name: 'jap_party_mass_details',
        //       path: 'party_massDetails',
        //       component: _import('jap/party_mass/party_massDetails'),
        //       meta:{
        //         parameter:true
        //       }
        //     }
        //   ]
        // },
        //专业人员  personnel
        {
          name: "jap_personnel",
          path: "jap_personnel",
          component: _import("jap/personnel/personnel"),
          redirect: { name: "jap_personnel_list" },
          children: [
            {
              name: "jap_personnel_list",
              path: "personnel_list",
              component: _import("jap/personnel/personnel_list")
            },
            {
              name: "jap_personnel_details",
              path: "personnelDetails",
              component: _import("jap/personnel/personnel_etails"),
              meta: {
                parameter: true
              }
            }
          ]
        },
        // 人才招聘
        // {
        //   name: 'jap_recruitment',
        //   path: 'jap_recruitment',
        //   component: _import('jap/recruitment/recruitment'),
        //   redirect: { name: 'jap_social' },
        //   children: [
        //     {
        //       name: 'jap_social',
        //       path: 'social',
        //       component: _import('jap/recruitment/social')
        //     },
        //     {
        //       name: 'jap_campus',
        //       path: 'campus',
        //       component: _import('jap/recruitment/campus')
        //     },
        //     {
        //       name: 'jap_life',
        //       path: 'life',
        //       component: _import('jap/recruitment/life')
        //     },
        //   ]
        // },
        // 活动专栏
        {
          name: "jap_activity",
          path: "jap_activity",
          component: _import("jap/activity/activity"),
          redirect: { name: "jap_activity_legalAid" },
          children: [
            {
              name: "jap_activity_legalAid",
              path: "legalAid",
              component: _import("jap/activity/legalAid")
            },
            {
              name: "jap_activity_legalAidDetalis",
              path: "legalAidDetails",
              component: _import("jap/activity/legalAidDetails")
            }
          ]
        },
        // 联系我们
        {
          name: "jap_contactUs",
          path: "jap_contactUs",
          component: _import("jap/contactUs/contactUs"),
          redirect: { name: "jap_contactUs_list" },
          children: [
            {
              name: "jap_contactUs_list",
              path: "jap_contactUs_list",
              component: _import("jap/contactUs/contactUs_list")
            },
            {
              name: "jap_contactUs_detail",
              path: "jap_contactUs_detail",
              component: _import("jap/contactUs/contactUsDetails"),
              meta: {
                parameter: true
              }
            },
            {
              name: "jap_contactUs_news_detail",
              path: "jap_contactUs__news_detail",
              component: _import("jap/contactUs/contactUsNews")
            }
          ]
        },
        {
          name: "jap_legalNotices",
          path: "jap_legalNotices",
          component: _import("jap/legalNotices/legalNotices")
        }, // 隐私条款
        {
          name: "jap_privacyPolicy",
          path: "/jap_privacyPolicy",
          component: _import("jap/privacyPolicy/PrivacyPolicy")
        }
      ]
    },
    // 站内搜索
    {
      name: "jap_search",
      path: "/jap_search",
      component: _import("jap/search/search")
    }
  ]
});
